/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.gatech.gellinservlet.model;

import java.util.ArrayList;
import java.io.Serializable;
/**
 *
 * @author Tyler Powell
 */
public class Student extends User implements Serializable{
    
    private ArrayList<Course> courseList;
    private ArrayList<Team> teamList;
    
    public Student(String name, String username, String password)
    {
        super(name, username, password);
        courseList = new ArrayList<Course>();
        teamList = new ArrayList<Team>();
    }
    
    public Student()
    {
        super();
        courseList = new ArrayList<Course>();
        teamList = new ArrayList<Team>();
    }
    
    //TODO change below methods to take in IDs for the course.
    //TODO the below methods will be called from the specific manager, thus they
    //shouldn't have managers as parameters.
    public void addCourse(Course aCourse)
    {
        courseList.add(aCourse);
        //TODO course must be passed in, a student cannot create a course
        //Check list for course before adding.
    }
    
    public void removeCourse(Course aCourse)
    {
        courseList.remove(aCourse);
    }
    
    
    public void addTeam(Team aTeam)
    {
        teamList.add(aTeam);
    }
    
    /**
     * Removes this student from the team.
     * @param teamID The ID of the team to be removed from.
     * @param tm The team manager that holds the team.
     */
    public void removeTeam(Team aTeam)
    {
        teamList.remove(aTeam);
    }

    public ArrayList<Course> getCourseList()
    {
        return courseList;
    }

    public ArrayList<Team> getTeamList()
    {
        return teamList;
    }
    
    
}
